from selenium import webdriver
from selenium.webdriver.chrome.service import Service


s=Service(r"/Users/didi1/Desktop/chromedriver.exe")
wd=webdriver.Chrome(service=s)
wd.implicitly_wait(10)
# r:表示后面的路径不存在转译
wd.get('http://cdn1.python3.vip/files/selenium/sample1.html')            # get()打开网址的方法
#
element=wd.find_elements_by_css_selector('#container span')
# element=wd.find_elements_by_css_selector('#container > #layer1')

for ele in element:
    print(ele.get_attribute('outerHTML'))
wd.quit()
